package com.wenyu.wenyuyuedu.utils;

import android.content.Context;
import android.view.inputmethod.InputMethodManager;
import android.widget.EditText;

import java.util.Timer;
import java.util.TimerTask;

/**
 * Created by lenovo on 2017/3/13.
 */

public class ShowHideJianPan {

    public static void showSoftKeyBorad(final EditText etContent, int time) {
        if(time == 0){
            time = 0;
        }
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            public void run() {
                InputMethodManager inputManager = (InputMethodManager) etContent.getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
                inputManager.showSoftInput(etContent, 0);
            }
        }, time);
    }

}
